import os
import sys

def relax():
	list = os.listdir("./output_result")
	list2 = []

	for i in list:
		if i[-4:-1] + i[-1] == ".pdb":
			list2.append(str(i).split(".pdb")[0])
	print(list2)
	for n in list2:
		try:
			os.system("relax.linuxgccrelease -s {}.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(n))
		except:
			os.system("relax.mpi.linuxgccrelease -s {}.pdb -out:pdb -relax:default_repeats 15 -relax:jump_move true -relax:bb_move true -relax:chi_move true -ignore_zero_occupancy false".format(n))




